<?php
namespace Admin\Model;
use Think\Model;

class menuModel extends Model {

    protected $tableName = 'menu';

    /**
     * 自动完成
     * @var array
     */
    protected $_auto = array(
    );
    /*
     * 自动验证
     */
    protected $_validate = array(
    );
    
    public function getMenuList ($where) {
        $where['status'] = 1;
        return $this->where($where)->select();
    }
    
    public function findMenuById ($id) {
        $where = array(
            'id' => $id,
            'status' => 1
        );
        return $this->where($where)->find();
    }

}
